#include <stdio.h>
#include <string.h>

namespace CERT_FSETPOS_VALUE {

	int opener_bad(FILE* file)
	{
		int rc;
		fpos_t offset;
		memset(&offset, 0, sizeof(offset));

		if (file == NULL) {
			return -1;
		}

		fsetpos(file, &offset);
		if (rc != 0) {
			return rc;
		}
		return 0;
	}


	int opener_good(FILE* file)
	{
		int rc;
		fpos_t offset;
		memset(&offset, 0, sizeof(offset));

		if (file == NULL) {
			return -1;
		}
		fgetpos(file, &offset);

		fsetpos(file, &offset);
		if (rc != 0) {
			return rc;
		}

		return 0;
	}
}